| Previous | Next | |
Flash Player 5.
my_xml.toString(): String
None.
A string.
Method; evaluates the specified XML object, constructs a textual representation of the XML structure, including the node, children, and attributes, and returns the result as a string.
For top-level XML objects (those created with the constructor), the XML.toString() method outputs the document’s XML declaration (stored in the XML.xmlDecl property), followed by the document’s DOCTYPE declaration (stored in the XML.docTypeDecl property), followed by the text representation of all XML nodes in the object. The XML declaration is not output if the XML.xmlDecl property is undefined. The DOCTYPE declaration is not output if the XML.docTypeDecl property is undefined.
The following example of the XML.toString() method displays <h1>test</h1> in the Output panel:
var node:XML = new XML("<h1>test</h1>");
trace(node.toString());
XML.docTypeDecl,XML.xmlDecl
| View comments on LiveDocs | Previous | Next | |